import './assets/main.css';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import Vant from 'vant';
import 'vant/lib/index.css';
import App from './App.vue';
import router from './router'; // 引入路由配置
import { useUserStore } from './stores/user';

const app = createApp(App);
const pinia = createPinia();
app.use(pinia);
app.use(router); // 使用路由配置
app.use(ElementPlus);
app.use(Vant);

const userStore = useUserStore(pinia);
userStore.initUser(); 

app.mount('#app');